package main

import "github.com/gin-gonic/gin"
import . "spideramazon/modules"

func initRouter() *gin.Engine {
	router := gin.Default()

	amazon := router.Group("amazon")

	/// 翻译
	/// http://127.0.0.1/amazon/taranslate?words=urlencode()
	amazon.GET("taranslate", Taranslate)

	/// 搜索
	/// http://127.0.0.1/amazon/searchList?words=urlencode()
	amazon.GET("searchList", FetchSearchList)

	/// 详情
	/// http://127.0.0.1/amazon/goodDetail?words=urlencode()
	amazon.GET("goodDetail", FetchGoodDetail)

	return router
}